#!/bin/bash

# 清理Python包构建产物脚本
# Clean up Python package build artifacts

echo "正在清理包构建产物..."
echo "Cleaning up build artifacts..."

# 删除构建目录和文件
rm -rf build/ dist/ *.egg-info/ __pycache__/ .pytest_cache/ .coverage htmlcov/

# 递归删除所有 __pycache__ 目录
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true

# 删除编译的Python文件
find . -name "*.pyc" -delete 2>/dev/null || true
find . -name "*.pyo" -delete 2>/dev/null || true
find . -name "*.pyd" -delete 2>/dev/null || true

echo "✅ 清理完成！"
echo "✅ Cleanup completed!"
